{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:04:29.703718Z",
     "start_time": "2024-04-02T11:04:29.699888Z"
    }
   },
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [],
   "source": [
    "data_level = pd.read_excel(\"笔记本更新前数据的level情况_0321_0326.xlsx\")"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:09:08.239899Z",
     "start_time": "2024-04-02T11:09:05.604331Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "                  product_no           goods_code shop_out_date  \\\n0      20240318115837621731_  216666029209234432_    2024-03-21   \n1      20240311103149801436_  217085821108717568_    2024-03-21   \n2      20240314151011634071_  217095990017612800_    2024-03-21   \n3      20240318082731648296_  217102116105848832_    2024-03-21   \n4      20240318074337877396_  217102020382197760_    2024-03-21   \n...                      ...                  ...           ...   \n13598  20240315142342262546_  217093389469277184_    2024-03-26   \n13599  20240320031719182853_  217112750219844608_    2024-03-26   \n13600  20240320183749229584_  214848741452475392_    2024-03-26   \n13601  20240309221518170649_  216617703426632704_    2024-03-26   \n13602  20240316161549343197_  217107270754540544_    2024-03-26   \n\n                 product_name product_brand_name  product_category_id  \\\n0             荣耀 荣耀猎人 游戏本V700                 荣耀                    5   \n1                     联想 N480                 联想                    5   \n2      苹果 MacBook Pro 15年 15寸                 苹果                    5   \n3                   联想 扬天 V15                 联想                    5   \n4           联想 小新 Pro 16 2023                 联想                    5   \n...                       ...                ...                  ...   \n13598  苹果 MacBook Pro 18年 15寸                 苹果                    5   \n13599            惠普 光影精灵5代 系列                 惠普                    5   \n13600        联想 小新 Air 13 Pro                 联想                    5   \n13601             机械革命 极光 Pro               机械革命                    5   \n13602        惠普 暗影精灵Ⅱ代 Pro 系列                 惠普                    5   \n\n       real_sell_price  forecast_reference_price  product_sku_id  \\\n0                 3097                      3072         3361498   \n1                  104                       127         4787620   \n2                 1370                      1372          137920   \n3                 1406                      1394         8340654   \n4                 4169                      4219        18505473   \n...                ...                       ...             ...   \n13598             2911                      2932         6528408   \n13599             2069                      2094         6017425   \n13600              715                       632         4063625   \n13601             4795                      4989        17848243   \n13602             1174                      1176         6128238   \n\n                                        product_sku_name product_level_name  \\\n0      荣耀 荣耀猎人 游戏本V700 i7 10代 RTX2060 固态硬盘512GB 不含机械硬...                 B3   \n1               联想 N480 i3 2代 独显2G以下 不含固态硬盘 机械硬盘500GB 2G                 D2   \n2      苹果 MacBook Pro 15年 15寸 i7 2.2G Iris Pro 固态硬盘25...                 C2   \n3      联想 扬天 V15 i3 11代 集显 固态硬盘512GB 不含机械硬盘 20G 大陆国行 ...                 B3   \n4      联想 小新 Pro 16 2023 i7 13代 集显 固态硬盘1TB 不含机械硬盘 16G...                 B3   \n...                                                  ...                ...   \n13598  苹果 MacBook Pro 18年 15寸 i7 2.2G Radeon555X 固态硬盘...                 B2   \n13599  惠普 光影精灵5代 系列 Ryzen 7 3代 GTX1660Ti 固态硬盘512GB 不含...                 B3   \n13600    联想 小新 Air 13 Pro i5 6代 独显2G 固态硬盘256GB 不含机械硬盘 8G                 B2   \n13601  机械革命 极光 Pro i7 12代 RTX4060 固态硬盘1.5TB 不含机械硬盘 16...                 B3   \n13602  惠普 暗影精灵Ⅱ代 Pro 系列 i5 7代 独显2G 固态硬盘128GB 机械硬盘1TB ...                 B3   \n\n       product_level_id  \n0                   519  \n1                   524  \n2                   522  \n3                   519  \n4                   519  \n...                 ...  \n13598               518  \n13599               519  \n13600               518  \n13601               519  \n13602               519  \n\n[13603 rows x 12 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>product_no</th>\n      <th>goods_code</th>\n      <th>shop_out_date</th>\n      <th>product_name</th>\n      <th>product_brand_name</th>\n      <th>product_category_id</th>\n      <th>real_sell_price</th>\n      <th>forecast_reference_price</th>\n      <th>product_sku_id</th>\n      <th>product_sku_name</th>\n      <th>product_level_name</th>\n      <th>product_level_id</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>20240318115837621731_</td>\n      <td>216666029209234432_</td>\n      <td>2024-03-21</td>\n      <td>荣耀 荣耀猎人 游戏本V700</td>\n      <td>荣耀</td>\n      <td>5</td>\n      <td>3097</td>\n      <td>3072</td>\n      <td>3361498</td>\n      <td>荣耀 荣耀猎人 游戏本V700 i7 10代 RTX2060 固态硬盘512GB 不含机械硬...</td>\n      <td>B3</td>\n      <td>519</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>20240311103149801436_</td>\n      <td>217085821108717568_</td>\n      <td>2024-03-21</td>\n      <td>联想 N480</td>\n      <td>联想</td>\n      <td>5</td>\n      <td>104</td>\n      <td>127</td>\n      <td>4787620</td>\n      <td>联想 N480 i3 2代 独显2G以下 不含固态硬盘 机械硬盘500GB 2G</td>\n      <td>D2</td>\n      <td>524</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>20240314151011634071_</td>\n      <td>217095990017612800_</td>\n      <td>2024-03-21</td>\n      <td>苹果 MacBook Pro 15年 15寸</td>\n      <td>苹果</td>\n      <td>5</td>\n      <td>1370</td>\n      <td>1372</td>\n      <td>137920</td>\n      <td>苹果 MacBook Pro 15年 15寸 i7 2.2G Iris Pro 固态硬盘25...</td>\n      <td>C2</td>\n      <td>522</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>20240318082731648296_</td>\n      <td>217102116105848832_</td>\n      <td>2024-03-21</td>\n      <td>联想 扬天 V15</td>\n      <td>联想</td>\n      <td>5</td>\n      <td>1406</td>\n      <td>1394</td>\n      <td>8340654</td>\n      <td>联想 扬天 V15 i3 11代 集显 固态硬盘512GB 不含机械硬盘 20G 大陆国行 ...</td>\n      <td>B3</td>\n      <td>519</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>20240318074337877396_</td>\n      <td>217102020382197760_</td>\n      <td>2024-03-21</td>\n      <td>联想 小新 Pro 16 2023</td>\n      <td>联想</td>\n      <td>5</td>\n      <td>4169</td>\n      <td>4219</td>\n      <td>18505473</td>\n      <td>联想 小新 Pro 16 2023 i7 13代 集显 固态硬盘1TB 不含机械硬盘 16G...</td>\n      <td>B3</td>\n      <td>519</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>13598</th>\n      <td>20240315142342262546_</td>\n      <td>217093389469277184_</td>\n      <td>2024-03-26</td>\n      <td>苹果 MacBook Pro 18年 15寸</td>\n      <td>苹果</td>\n      <td>5</td>\n      <td>2911</td>\n      <td>2932</td>\n      <td>6528408</td>\n      <td>苹果 MacBook Pro 18年 15寸 i7 2.2G Radeon555X 固态硬盘...</td>\n      <td>B2</td>\n      <td>518</td>\n    </tr>\n    <tr>\n      <th>13599</th>\n      <td>20240320031719182853_</td>\n      <td>217112750219844608_</td>\n      <td>2024-03-26</td>\n      <td>惠普 光影精灵5代 系列</td>\n      <td>惠普</td>\n      <td>5</td>\n      <td>2069</td>\n      <td>2094</td>\n      <td>6017425</td>\n      <td>惠普 光影精灵5代 系列 Ryzen 7 3代 GTX1660Ti 固态硬盘512GB 不含...</td>\n      <td>B3</td>\n      <td>519</td>\n    </tr>\n    <tr>\n      <th>13600</th>\n      <td>20240320183749229584_</td>\n      <td>214848741452475392_</td>\n      <td>2024-03-26</td>\n      <td>联想 小新 Air 13 Pro</td>\n      <td>联想</td>\n      <td>5</td>\n      <td>715</td>\n      <td>632</td>\n      <td>4063625</td>\n      <td>联想 小新 Air 13 Pro i5 6代 独显2G 固态硬盘256GB 不含机械硬盘 8G</td>\n      <td>B2</td>\n      <td>518</td>\n    </tr>\n    <tr>\n      <th>13601</th>\n      <td>20240309221518170649_</td>\n      <td>216617703426632704_</td>\n      <td>2024-03-26</td>\n      <td>机械革命 极光 Pro</td>\n      <td>机械革命</td>\n      <td>5</td>\n      <td>4795</td>\n      <td>4989</td>\n      <td>17848243</td>\n      <td>机械革命 极光 Pro i7 12代 RTX4060 固态硬盘1.5TB 不含机械硬盘 16...</td>\n      <td>B3</td>\n      <td>519</td>\n    </tr>\n    <tr>\n      <th>13602</th>\n      <td>20240316161549343197_</td>\n      <td>217107270754540544_</td>\n      <td>2024-03-26</td>\n      <td>惠普 暗影精灵Ⅱ代 Pro 系列</td>\n      <td>惠普</td>\n      <td>5</td>\n      <td>1174</td>\n      <td>1176</td>\n      <td>6128238</td>\n      <td>惠普 暗影精灵Ⅱ代 Pro 系列 i5 7代 独显2G 固态硬盘128GB 机械硬盘1TB ...</td>\n      <td>B3</td>\n      <td>519</td>\n    </tr>\n  </tbody>\n</table>\n<p>13603 rows × 12 columns</p>\n</div>"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_level"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:09:11.093401Z",
     "start_time": "2024-04-02T11:09:11.066593Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [],
   "source": [
    "level2_mapping_old = pd.read_excel(\"level2_mapping_old.xlsx\")"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:10:10.631817Z",
     "start_time": "2024-04-02T11:10:03.718089Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "data": {
      "text/plain": "                update_dt quotation_document_begin_date  \\\n0     2024-03-18 10:25:21                    2024-03-09   \n1     2024-03-18 10:25:21                    2024-03-09   \n2     2024-03-11 11:26:51                    2024-03-05   \n3     2024-03-11 11:32:04                    2024-03-02   \n4     2024-03-11 11:36:52                    2024-02-29   \n...                   ...                           ...   \n40066 2024-02-29 16:58:59                    2023-12-01   \n40067 2024-02-29 16:58:59                    2023-12-01   \n40068 2024-02-29 16:58:59                    2023-12-01   \n40069 2024-02-29 16:58:59                    2023-12-01   \n40070 2024-02-29 16:58:59                    2023-12-01   \n\n                  product_no           goods_code  product_sku_id  \\\n0      20240306170531062865_  217068227197869056_         6952866   \n1      20240227194140383292_  217045952292835328_         6693819   \n2      20240226121657167737_  217044959413209088_        18206828   \n3      20240229114321143255_  217050735520570368_         3613531   \n4      20240225195241446593_  217040364025355264_         7851295   \n...                      ...                  ...             ...   \n40066  20231121103659668127_  216343571250727936_         6784275   \n40067  20231126155716627372_  216782444451717120_         2165325   \n40068  20231115182605763637_  216753130307063808_         6525911   \n40069  20231128175412401822_  216788038551140352_          138066   \n40070  20231125220431456965_  215500507669842944_         6518141   \n\n                                        product_sku_name  product_level_id  \\\n0      苹果 MacBook Pro 22年 13寸 M2 固态硬盘512GB 8G 大陆国行 保修...               530   \n1      华硕 天选3 i7 12代 RTX3060 固态硬盘512GB 不含机械硬盘 16G 日蚀灰...               523   \n2      华为 MateBook X 2017 i7 7代 集显 固态硬盘256GB 不含机械硬盘 8...               519   \n3      惠普 暗影精灵Ⅳ代 系列 i5 8代 GTX1060 固态硬盘128GB 不含机械硬盘 8G...               514   \n4      惠普 光影精灵6 系列 i5 11代 RTX3050 固态硬盘512GB 不含机械硬盘 16...               518   \n...                                                  ...               ...   \n40066  联想 拯救者 R7000P 2020 Ryzen 7 4代 RTX2060 固态硬盘512G...               518   \n40067  联想 拯救者 R7000 2020 Ryzen 5 4代 GTX1650 固态硬盘512GB...               525   \n40068  苹果 MacBook Pro 19年 13寸 i5 2.4G HD655 固态硬盘512GB...               519   \n40069  苹果 MacBook Air 15年 13寸 i5 1.6G HD6000 固态硬盘256G...               522   \n40070  苹果 MacBook Pro M1 20年 13寸 Apple M1 固态硬盘256GB 不...               514   \n\n      product_level_name  product_level_id_2 product_level_name_2  \n0                      F                 531                    G  \n1                     D1                 524                   D2  \n2                     B3                 518                   B2  \n3                     A2                 505                   A1  \n4                     B2                 518                   B2  \n...                  ...                 ...                  ...  \n40066                 B2                 518                   B2  \n40067                 D3                 527                   E2  \n40068                 B3                 519                   B3  \n40069                 C2                 526                   E1  \n40070                 A2                 505                   A1  \n\n[40071 rows x 10 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>update_dt</th>\n      <th>quotation_document_begin_date</th>\n      <th>product_no</th>\n      <th>goods_code</th>\n      <th>product_sku_id</th>\n      <th>product_sku_name</th>\n      <th>product_level_id</th>\n      <th>product_level_name</th>\n      <th>product_level_id_2</th>\n      <th>product_level_name_2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2024-03-18 10:25:21</td>\n      <td>2024-03-09</td>\n      <td>20240306170531062865_</td>\n      <td>217068227197869056_</td>\n      <td>6952866</td>\n      <td>苹果 MacBook Pro 22年 13寸 M2 固态硬盘512GB 8G 大陆国行 保修...</td>\n      <td>530</td>\n      <td>F</td>\n      <td>531</td>\n      <td>G</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2024-03-18 10:25:21</td>\n      <td>2024-03-09</td>\n      <td>20240227194140383292_</td>\n      <td>217045952292835328_</td>\n      <td>6693819</td>\n      <td>华硕 天选3 i7 12代 RTX3060 固态硬盘512GB 不含机械硬盘 16G 日蚀灰...</td>\n      <td>523</td>\n      <td>D1</td>\n      <td>524</td>\n      <td>D2</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2024-03-11 11:26:51</td>\n      <td>2024-03-05</td>\n      <td>20240226121657167737_</td>\n      <td>217044959413209088_</td>\n      <td>18206828</td>\n      <td>华为 MateBook X 2017 i7 7代 集显 固态硬盘256GB 不含机械硬盘 8...</td>\n      <td>519</td>\n      <td>B3</td>\n      <td>518</td>\n      <td>B2</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2024-03-11 11:32:04</td>\n      <td>2024-03-02</td>\n      <td>20240229114321143255_</td>\n      <td>217050735520570368_</td>\n      <td>3613531</td>\n      <td>惠普 暗影精灵Ⅳ代 系列 i5 8代 GTX1060 固态硬盘128GB 不含机械硬盘 8G...</td>\n      <td>514</td>\n      <td>A2</td>\n      <td>505</td>\n      <td>A1</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2024-03-11 11:36:52</td>\n      <td>2024-02-29</td>\n      <td>20240225195241446593_</td>\n      <td>217040364025355264_</td>\n      <td>7851295</td>\n      <td>惠普 光影精灵6 系列 i5 11代 RTX3050 固态硬盘512GB 不含机械硬盘 16...</td>\n      <td>518</td>\n      <td>B2</td>\n      <td>518</td>\n      <td>B2</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>40066</th>\n      <td>2024-02-29 16:58:59</td>\n      <td>2023-12-01</td>\n      <td>20231121103659668127_</td>\n      <td>216343571250727936_</td>\n      <td>6784275</td>\n      <td>联想 拯救者 R7000P 2020 Ryzen 7 4代 RTX2060 固态硬盘512G...</td>\n      <td>518</td>\n      <td>B2</td>\n      <td>518</td>\n      <td>B2</td>\n    </tr>\n    <tr>\n      <th>40067</th>\n      <td>2024-02-29 16:58:59</td>\n      <td>2023-12-01</td>\n      <td>20231126155716627372_</td>\n      <td>216782444451717120_</td>\n      <td>2165325</td>\n      <td>联想 拯救者 R7000 2020 Ryzen 5 4代 GTX1650 固态硬盘512GB...</td>\n      <td>525</td>\n      <td>D3</td>\n      <td>527</td>\n      <td>E2</td>\n    </tr>\n    <tr>\n      <th>40068</th>\n      <td>2024-02-29 16:58:59</td>\n      <td>2023-12-01</td>\n      <td>20231115182605763637_</td>\n      <td>216753130307063808_</td>\n      <td>6525911</td>\n      <td>苹果 MacBook Pro 19年 13寸 i5 2.4G HD655 固态硬盘512GB...</td>\n      <td>519</td>\n      <td>B3</td>\n      <td>519</td>\n      <td>B3</td>\n    </tr>\n    <tr>\n      <th>40069</th>\n      <td>2024-02-29 16:58:59</td>\n      <td>2023-12-01</td>\n      <td>20231128175412401822_</td>\n      <td>216788038551140352_</td>\n      <td>138066</td>\n      <td>苹果 MacBook Air 15年 13寸 i5 1.6G HD6000 固态硬盘256G...</td>\n      <td>522</td>\n      <td>C2</td>\n      <td>526</td>\n      <td>E1</td>\n    </tr>\n    <tr>\n      <th>40070</th>\n      <td>2024-02-29 16:58:59</td>\n      <td>2023-12-01</td>\n      <td>20231125220431456965_</td>\n      <td>215500507669842944_</td>\n      <td>6518141</td>\n      <td>苹果 MacBook Pro M1 20年 13寸 Apple M1 固态硬盘256GB 不...</td>\n      <td>514</td>\n      <td>A2</td>\n      <td>505</td>\n      <td>A1</td>\n    </tr>\n  </tbody>\n</table>\n<p>40071 rows × 10 columns</p>\n</div>"
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "level2_mapping_old"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:10:40.016238Z",
     "start_time": "2024-04-02T11:10:39.968215Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [],
   "source": [
    "data_level_con = data_level.to_dict(orient=\"records\")"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:11:43.218803Z",
     "start_time": "2024-04-02T11:11:43.104506Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [],
   "source": [
    "level2_mapping_old_con = level2_mapping_old.to_dict(orient=\"records\")"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T11:11:52.422127Z",
     "start_time": "2024-04-02T11:11:51.850482Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [
    {
     "data": {
      "text/plain": "Index(['product_no', 'goods_code', 'shop_out_date', 'product_name',\n       'product_brand_name', 'product_category_id', 'real_sell_price',\n       'forecast_reference_price', 'product_sku_id', 'product_sku_name',\n       'product_level_name', 'product_level_id'],\n      dtype='object')"
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_level.columns"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T12:00:39.583499Z",
     "start_time": "2024-04-02T12:00:39.569543Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "outputs": [
    {
     "data": {
      "text/plain": "Index(['update_dt', 'quotation_document_begin_date', 'product_no',\n       'goods_code', 'product_sku_id', 'product_sku_name', 'product_level_id',\n       'product_level_name', 'product_level_id_2', 'product_level_name_2'],\n      dtype='object')"
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "level2_mapping_old.columns"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T12:00:50.107318Z",
     "start_time": "2024-04-02T12:00:50.092986Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [],
   "source": [
    "import copy"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T12:07:23.378156Z",
     "start_time": "2024-04-02T12:07:23.364007Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "outputs": [],
   "source": [
    "new_c = []\n",
    "\n",
    "for dl_c in data_level_con:\n",
    "    for map_c in level2_mapping_old_con:\n",
    "        if dl_c[\"product_no\"] == map_c[\"product_no\"] and dl_c[\"shop_out_date\"] == map_c[\"quotation_document_begin_date\"]:\n",
    "            dl_c[\"product_level_id_2\"] = map_c[\"product_level_id_2\"]\n",
    "            dl_c[\"product_level_name_2\"] = map_c[\"product_level_name_2\"]\n",
    "            dic = copy.deepcopy(dl_c)\n",
    "            new_c.append(dic)\n",
    "            break"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T12:09:08.756160Z",
     "start_time": "2024-04-02T12:07:36.826649Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "826"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(new_c)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T12:10:44.512606Z",
     "start_time": "2024-04-02T12:10:44.481864Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "data": {
      "text/plain": "(13603, 40071)"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(data_level_con), len(level2_mapping_old_con)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-02T12:11:07.186383Z",
     "start_time": "2024-04-02T12:11:07.152516Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "                  product_no           goods_code shop_out_date  \\\n0      20230213104511653385_  216541648913644544_    2024-01-01   \n1      20231002110258812955_  216881335093039104_    2024-01-01   \n2      20231221111450791136_  216872555152718848_    2024-01-01   \n3      20231224151647007262_  216861339120275456_    2024-01-01   \n4      20231214211102018572_  216883569966531584_    2024-01-01   \n...                      ...                  ...           ...   \n86971  20240313075619783215_  215615628938646528_    2024-03-25   \n86972  20240320125158846792_  217111313727183872_    2024-03-25   \n86973  20240302120951485537_  216537934445685760_    2024-03-25   \n86974  20240319010913413690_  216671713778838528_    2024-03-25   \n86975  20240303090232681391_  217121839172328448_    2024-03-25   \n\n                    product_name product_brand_name product_level_name  \\\n0      戴尔 Inspiron 灵越 15 7591 系列                 戴尔                 A2   \n1            华为 MateBook 14 2019                 华为                 B3   \n2      戴尔 Inspiron 灵越 15 7591 系列                 戴尔                 B3   \n3       微软 Surface Laptop Studio                 微软                 B2   \n4              华为 MateBook X Pro                 华为                 B3   \n...                          ...                ...                ...   \n86971     苹果 MacBook Pro 22年 13寸                 苹果                 B3   \n86972                华硕 顽石 Y5200                 华硕                  F   \n86973                机械革命 极光 Pro               机械革命                 A4   \n86974   华为 MateBook D 14 SE 2024                 华为                 A2   \n86975           RedmiBook Pro 15                 小米                 C1   \n\n      product_level_name_new  real_sell_price  product_sku_id  \\\n0                         A1             2155         2952015   \n1                         C2             1377         8341268   \n2                         D1             1735         2946479   \n3                         B2             5630         6901973   \n4                         C1             2795        17945245   \n...                      ...              ...             ...   \n86971                     B2             5298         6952937   \n86972                      F              639         3442048   \n86973                     A4             4598         8249839   \n86974                     A1             3280        18307857   \n86975                     D1             2124         5927727   \n\n                                        product_sku_name  product_category_id  \\\n0      戴尔 Inspiron 灵越 15 7591 系列 i7 9代 GTX1650 固态硬盘51...                    5   \n1      华为 MateBook 14 2019 i5 8代 独显2G 固态硬盘256GB 不含机械硬...                    5   \n2      戴尔 Inspiron 灵越 15 7591 系列 i5 9代 GTX1650 固态硬盘51...                    5   \n3      微软 Surface Laptop Studio i7 11代 RTX3050Ti 固态硬盘...                    5   \n4      华为 MateBook X Pro i7 8代 MX250 固态硬盘1TB 不含机械硬盘 1...                    5   \n...                                                  ...                  ...   \n86971  苹果 MacBook Pro 22年 13寸 M2 固态硬盘256GB 8G 大陆国行 保修...                    5   \n86972         华硕 顽石 Y5200 i3 8代 独显2G 固态硬盘256GB 不含机械硬盘 8G                    5   \n86973  机械革命 极光 Pro i7 12代 RTX4060 固态硬盘512GB 不含机械硬盘 16...                    5   \n86974  华为 MateBook D 14 SE 2024 i5 13代 集显 固态硬盘1TB 不含机...                    5   \n86975  RedmiBook Pro 15 i7 11代 MX450 固态硬盘512GB 不含机械硬盘...                    5   \n\n       product_level_id  product_level_id_new  \n0                   514                   505  \n1                   519                   522  \n2                   519                   523  \n3                   518                   518  \n4                   519                   521  \n...                 ...                   ...  \n86971               519                   518  \n86972               530                   530  \n86973               516                   516  \n86974               514                   505  \n86975               521                   523  \n\n[86976 rows x 13 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>product_no</th>\n      <th>goods_code</th>\n      <th>shop_out_date</th>\n      <th>product_name</th>\n      <th>product_brand_name</th>\n      <th>product_level_name</th>\n      <th>product_level_name_new</th>\n      <th>real_sell_price</th>\n      <th>product_sku_id</th>\n      <th>product_sku_name</th>\n      <th>product_category_id</th>\n      <th>product_level_id</th>\n      <th>product_level_id_new</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>20230213104511653385_</td>\n      <td>216541648913644544_</td>\n      <td>2024-01-01</td>\n      <td>戴尔 Inspiron 灵越 15 7591 系列</td>\n      <td>戴尔</td>\n      <td>A2</td>\n      <td>A1</td>\n      <td>2155</td>\n      <td>2952015</td>\n      <td>戴尔 Inspiron 灵越 15 7591 系列 i7 9代 GTX1650 固态硬盘51...</td>\n      <td>5</td>\n      <td>514</td>\n      <td>505</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>20231002110258812955_</td>\n      <td>216881335093039104_</td>\n      <td>2024-01-01</td>\n      <td>华为 MateBook 14 2019</td>\n      <td>华为</td>\n      <td>B3</td>\n      <td>C2</td>\n      <td>1377</td>\n      <td>8341268</td>\n      <td>华为 MateBook 14 2019 i5 8代 独显2G 固态硬盘256GB 不含机械硬...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>522</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>20231221111450791136_</td>\n      <td>216872555152718848_</td>\n      <td>2024-01-01</td>\n      <td>戴尔 Inspiron 灵越 15 7591 系列</td>\n      <td>戴尔</td>\n      <td>B3</td>\n      <td>D1</td>\n      <td>1735</td>\n      <td>2946479</td>\n      <td>戴尔 Inspiron 灵越 15 7591 系列 i5 9代 GTX1650 固态硬盘51...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>523</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>20231224151647007262_</td>\n      <td>216861339120275456_</td>\n      <td>2024-01-01</td>\n      <td>微软 Surface Laptop Studio</td>\n      <td>微软</td>\n      <td>B2</td>\n      <td>B2</td>\n      <td>5630</td>\n      <td>6901973</td>\n      <td>微软 Surface Laptop Studio i7 11代 RTX3050Ti 固态硬盘...</td>\n      <td>5</td>\n      <td>518</td>\n      <td>518</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>20231214211102018572_</td>\n      <td>216883569966531584_</td>\n      <td>2024-01-01</td>\n      <td>华为 MateBook X Pro</td>\n      <td>华为</td>\n      <td>B3</td>\n      <td>C1</td>\n      <td>2795</td>\n      <td>17945245</td>\n      <td>华为 MateBook X Pro i7 8代 MX250 固态硬盘1TB 不含机械硬盘 1...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>521</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>86971</th>\n      <td>20240313075619783215_</td>\n      <td>215615628938646528_</td>\n      <td>2024-03-25</td>\n      <td>苹果 MacBook Pro 22年 13寸</td>\n      <td>苹果</td>\n      <td>B3</td>\n      <td>B2</td>\n      <td>5298</td>\n      <td>6952937</td>\n      <td>苹果 MacBook Pro 22年 13寸 M2 固态硬盘256GB 8G 大陆国行 保修...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>518</td>\n    </tr>\n    <tr>\n      <th>86972</th>\n      <td>20240320125158846792_</td>\n      <td>217111313727183872_</td>\n      <td>2024-03-25</td>\n      <td>华硕 顽石 Y5200</td>\n      <td>华硕</td>\n      <td>F</td>\n      <td>F</td>\n      <td>639</td>\n      <td>3442048</td>\n      <td>华硕 顽石 Y5200 i3 8代 独显2G 固态硬盘256GB 不含机械硬盘 8G</td>\n      <td>5</td>\n      <td>530</td>\n      <td>530</td>\n    </tr>\n    <tr>\n      <th>86973</th>\n      <td>20240302120951485537_</td>\n      <td>216537934445685760_</td>\n      <td>2024-03-25</td>\n      <td>机械革命 极光 Pro</td>\n      <td>机械革命</td>\n      <td>A4</td>\n      <td>A4</td>\n      <td>4598</td>\n      <td>8249839</td>\n      <td>机械革命 极光 Pro i7 12代 RTX4060 固态硬盘512GB 不含机械硬盘 16...</td>\n      <td>5</td>\n      <td>516</td>\n      <td>516</td>\n    </tr>\n    <tr>\n      <th>86974</th>\n      <td>20240319010913413690_</td>\n      <td>216671713778838528_</td>\n      <td>2024-03-25</td>\n      <td>华为 MateBook D 14 SE 2024</td>\n      <td>华为</td>\n      <td>A2</td>\n      <td>A1</td>\n      <td>3280</td>\n      <td>18307857</td>\n      <td>华为 MateBook D 14 SE 2024 i5 13代 集显 固态硬盘1TB 不含机...</td>\n      <td>5</td>\n      <td>514</td>\n      <td>505</td>\n    </tr>\n    <tr>\n      <th>86975</th>\n      <td>20240303090232681391_</td>\n      <td>217121839172328448_</td>\n      <td>2024-03-25</td>\n      <td>RedmiBook Pro 15</td>\n      <td>小米</td>\n      <td>C1</td>\n      <td>D1</td>\n      <td>2124</td>\n      <td>5927727</td>\n      <td>RedmiBook Pro 15 i7 11代 MX450 固态硬盘512GB 不含机械硬盘...</td>\n      <td>5</td>\n      <td>521</td>\n      <td>523</td>\n    </tr>\n  </tbody>\n</table>\n<p>86976 rows × 13 columns</p>\n</div>"
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_excel(\"笔记本数据详情_2024_0101-0325.xlsx\")\n",
    "data"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T01:42:12.732023Z",
     "start_time": "2024-04-03T01:41:56.066782Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "outputs": [],
   "source": [
    "import datetime"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T01:58:27.243320Z",
     "start_time": "2024-04-03T01:58:27.230408Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [],
   "source": [
    "s_date = datetime.datetime.strptime('20240321', '%Y%m%d').date()\n",
    "e_date = datetime.datetime.strptime('20240325', '%Y%m%d').date()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T01:59:07.284093Z",
     "start_time": "2024-04-03T01:59:07.271322Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "outputs": [],
   "source": [
    "data[\"shop_out_date\"] = pd.to_datetime(data[\"shop_out_date\"]).dt.date"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T02:01:58.118165Z",
     "start_time": "2024-04-03T02:01:58.066212Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "outputs": [],
   "source": [
    "old_data_21_25 = data[(data[\"shop_out_date\"] >= s_date) & (data[\"shop_out_date\"] <= e_date)]"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T02:01:58.604860Z",
     "start_time": "2024-04-03T02:01:58.552540Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "outputs": [
    {
     "data": {
      "text/plain": "(86976, 7085)"
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(data), len(old_data_21_25)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T02:02:09.357011Z",
     "start_time": "2024-04-03T02:02:09.320416Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "outputs": [
    {
     "data": {
      "text/plain": "                  product_no           goods_code shop_out_date  \\\n79891  20240319152353481481_  217104840779171840_    2024-03-21   \n79892  20240301104710261013_  216479707889969152_    2024-03-21   \n79893  20240317082541657623_  217099720951138304_    2024-03-21   \n79894  20240318155258755374_  217110058669743104_    2024-03-21   \n79895  20230708085646735431_  217104869906553856_    2024-03-21   \n...                      ...                  ...           ...   \n86971  20240313075619783215_  215615628938646528_    2024-03-25   \n86972  20240320125158846792_  217111313727183872_    2024-03-25   \n86973  20240302120951485537_  216537934445685760_    2024-03-25   \n86974  20240319010913413690_  216671713778838528_    2024-03-25   \n86975  20240303090232681391_  217121839172328448_    2024-03-25   \n\n                   product_name product_brand_name product_level_name  \\\n79891               联想 拯救者 R720                 联想                 D1   \n79892                    华硕 天选4                 华硕                 A2   \n79893                    华硕 天选2                 华硕                 B3   \n79894         联想 小新 Pro 16 2022                 联想                 D3   \n79895          华硕 飞行堡垒 7 (FX95)                 华硕                 B3   \n...                         ...                ...                ...   \n86971    苹果 MacBook Pro 22年 13寸                 苹果                 B3   \n86972               华硕 顽石 Y5200                 华硕                  F   \n86973               机械革命 极光 Pro               机械革命                 A4   \n86974  华为 MateBook D 14 SE 2024                 华为                 A2   \n86975          RedmiBook Pro 15                 小米                 C1   \n\n      product_level_name_new  real_sell_price  product_sku_id  \\\n79891                     D3             1231         8336661   \n79892                     A1             6301        12106470   \n79893                     B3             3442         5948210   \n79894                     E2             2575         6888469   \n79895                     B2             1669         3499319   \n...                      ...              ...             ...   \n86971                     B2             5298         6952937   \n86972                      F              639         3442048   \n86973                     A4             4598         8249839   \n86974                     A1             3280        18307857   \n86975                     D1             2124         5927727   \n\n                                        product_sku_name  product_category_id  \\\n79891  联想 拯救者 R720 i5 7代 独显2G 固态硬盘128GB 机械硬盘1TB 8G 黑色...                    5   \n79892     华硕 天选4 Ryzen 9 7代 RTX4060 固态硬盘512GB 不含机械硬盘 16G                    5   \n79893  华硕 天选2 Ryzen 7 5代 RTX3050Ti 固态硬盘512GB 不含机械硬盘 1...                    5   \n79894  联想 小新 Pro 16 2022 i5 12代 集显 固态硬盘512GB 不含机械硬盘 1...                    5   \n79895  华硕 飞行堡垒 7 (FX95) Ryzen 7 3代 GTX1050 固态硬盘512GB ...                    5   \n...                                                  ...                  ...   \n86971  苹果 MacBook Pro 22年 13寸 M2 固态硬盘256GB 8G 大陆国行 保修...                    5   \n86972         华硕 顽石 Y5200 i3 8代 独显2G 固态硬盘256GB 不含机械硬盘 8G                    5   \n86973  机械革命 极光 Pro i7 12代 RTX4060 固态硬盘512GB 不含机械硬盘 16...                    5   \n86974  华为 MateBook D 14 SE 2024 i5 13代 集显 固态硬盘1TB 不含机...                    5   \n86975  RedmiBook Pro 15 i7 11代 MX450 固态硬盘512GB 不含机械硬盘...                    5   \n\n       product_level_id  product_level_id_new  \n79891               523                   525  \n79892               514                   505  \n79893               519                   519  \n79894               525                   527  \n79895               519                   518  \n...                 ...                   ...  \n86971               519                   518  \n86972               530                   530  \n86973               516                   516  \n86974               514                   505  \n86975               521                   523  \n\n[7085 rows x 13 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>product_no</th>\n      <th>goods_code</th>\n      <th>shop_out_date</th>\n      <th>product_name</th>\n      <th>product_brand_name</th>\n      <th>product_level_name</th>\n      <th>product_level_name_new</th>\n      <th>real_sell_price</th>\n      <th>product_sku_id</th>\n      <th>product_sku_name</th>\n      <th>product_category_id</th>\n      <th>product_level_id</th>\n      <th>product_level_id_new</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>79891</th>\n      <td>20240319152353481481_</td>\n      <td>217104840779171840_</td>\n      <td>2024-03-21</td>\n      <td>联想 拯救者 R720</td>\n      <td>联想</td>\n      <td>D1</td>\n      <td>D3</td>\n      <td>1231</td>\n      <td>8336661</td>\n      <td>联想 拯救者 R720 i5 7代 独显2G 固态硬盘128GB 机械硬盘1TB 8G 黑色...</td>\n      <td>5</td>\n      <td>523</td>\n      <td>525</td>\n    </tr>\n    <tr>\n      <th>79892</th>\n      <td>20240301104710261013_</td>\n      <td>216479707889969152_</td>\n      <td>2024-03-21</td>\n      <td>华硕 天选4</td>\n      <td>华硕</td>\n      <td>A2</td>\n      <td>A1</td>\n      <td>6301</td>\n      <td>12106470</td>\n      <td>华硕 天选4 Ryzen 9 7代 RTX4060 固态硬盘512GB 不含机械硬盘 16G</td>\n      <td>5</td>\n      <td>514</td>\n      <td>505</td>\n    </tr>\n    <tr>\n      <th>79893</th>\n      <td>20240317082541657623_</td>\n      <td>217099720951138304_</td>\n      <td>2024-03-21</td>\n      <td>华硕 天选2</td>\n      <td>华硕</td>\n      <td>B3</td>\n      <td>B3</td>\n      <td>3442</td>\n      <td>5948210</td>\n      <td>华硕 天选2 Ryzen 7 5代 RTX3050Ti 固态硬盘512GB 不含机械硬盘 1...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>519</td>\n    </tr>\n    <tr>\n      <th>79894</th>\n      <td>20240318155258755374_</td>\n      <td>217110058669743104_</td>\n      <td>2024-03-21</td>\n      <td>联想 小新 Pro 16 2022</td>\n      <td>联想</td>\n      <td>D3</td>\n      <td>E2</td>\n      <td>2575</td>\n      <td>6888469</td>\n      <td>联想 小新 Pro 16 2022 i5 12代 集显 固态硬盘512GB 不含机械硬盘 1...</td>\n      <td>5</td>\n      <td>525</td>\n      <td>527</td>\n    </tr>\n    <tr>\n      <th>79895</th>\n      <td>20230708085646735431_</td>\n      <td>217104869906553856_</td>\n      <td>2024-03-21</td>\n      <td>华硕 飞行堡垒 7 (FX95)</td>\n      <td>华硕</td>\n      <td>B3</td>\n      <td>B2</td>\n      <td>1669</td>\n      <td>3499319</td>\n      <td>华硕 飞行堡垒 7 (FX95) Ryzen 7 3代 GTX1050 固态硬盘512GB ...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>518</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>86971</th>\n      <td>20240313075619783215_</td>\n      <td>215615628938646528_</td>\n      <td>2024-03-25</td>\n      <td>苹果 MacBook Pro 22年 13寸</td>\n      <td>苹果</td>\n      <td>B3</td>\n      <td>B2</td>\n      <td>5298</td>\n      <td>6952937</td>\n      <td>苹果 MacBook Pro 22年 13寸 M2 固态硬盘256GB 8G 大陆国行 保修...</td>\n      <td>5</td>\n      <td>519</td>\n      <td>518</td>\n    </tr>\n    <tr>\n      <th>86972</th>\n      <td>20240320125158846792_</td>\n      <td>217111313727183872_</td>\n      <td>2024-03-25</td>\n      <td>华硕 顽石 Y5200</td>\n      <td>华硕</td>\n      <td>F</td>\n      <td>F</td>\n      <td>639</td>\n      <td>3442048</td>\n      <td>华硕 顽石 Y5200 i3 8代 独显2G 固态硬盘256GB 不含机械硬盘 8G</td>\n      <td>5</td>\n      <td>530</td>\n      <td>530</td>\n    </tr>\n    <tr>\n      <th>86973</th>\n      <td>20240302120951485537_</td>\n      <td>216537934445685760_</td>\n      <td>2024-03-25</td>\n      <td>机械革命 极光 Pro</td>\n      <td>机械革命</td>\n      <td>A4</td>\n      <td>A4</td>\n      <td>4598</td>\n      <td>8249839</td>\n      <td>机械革命 极光 Pro i7 12代 RTX4060 固态硬盘512GB 不含机械硬盘 16...</td>\n      <td>5</td>\n      <td>516</td>\n      <td>516</td>\n    </tr>\n    <tr>\n      <th>86974</th>\n      <td>20240319010913413690_</td>\n      <td>216671713778838528_</td>\n      <td>2024-03-25</td>\n      <td>华为 MateBook D 14 SE 2024</td>\n      <td>华为</td>\n      <td>A2</td>\n      <td>A1</td>\n      <td>3280</td>\n      <td>18307857</td>\n      <td>华为 MateBook D 14 SE 2024 i5 13代 集显 固态硬盘1TB 不含机...</td>\n      <td>5</td>\n      <td>514</td>\n      <td>505</td>\n    </tr>\n    <tr>\n      <th>86975</th>\n      <td>20240303090232681391_</td>\n      <td>217121839172328448_</td>\n      <td>2024-03-25</td>\n      <td>RedmiBook Pro 15</td>\n      <td>小米</td>\n      <td>C1</td>\n      <td>D1</td>\n      <td>2124</td>\n      <td>5927727</td>\n      <td>RedmiBook Pro 15 i7 11代 MX450 固态硬盘512GB 不含机械硬盘...</td>\n      <td>5</td>\n      <td>521</td>\n      <td>523</td>\n    </tr>\n  </tbody>\n</table>\n<p>7085 rows × 13 columns</p>\n</div>"
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "old_data_21_25"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2024-04-03T02:02:18.740995Z",
     "start_time": "2024-04-03T02:02:18.686745Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "old_data_21_25.groupby('')"
   ],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
